<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="/billing" prefix="b"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>计费后台管理</title>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/managercss.css">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/wbox.css">
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.4.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery.datepicker.zh.js"></script>
<script type="text/javascript">
	$(function(){
		$(".list div").mousemove(function(){
			$(this).css("background","#E3EEFF");
		}).mouseout(function(){
			$(this).css("background","");
		});
		$("#userId").val("${userId}");
		$("#startTime").val("${startTime}");
		$("#endTime").val("${endTime}");
		$("#startTime").datepicker();
		$("#endTime").datepicker();
	});

</script>
</head>
<body>
<div class="information">
	<div class="title">
		用户操作日志列表
	</div>
	<div class="search">
		<form action="<%=request.getContextPath() %>/admin/calllog" method="post">
		用户:
		<select name="userId" id="userId" style="width: 150px;">
			<c:choose>
				<c:when test="${sessionScope.adminUser.userName=='admin'}">
					<option value="0">------请选择------</option>
					<c:forEach items="${adminUserList}" var="user">
						<option value="${user.userId }">${user.userName }</option>
					</c:forEach>
				</c:when>
				<c:otherwise>
					<option value="${sessionScope.adminUser.userId }">${sessionScope.adminUser.userName }</option>
				</c:otherwise>
			</c:choose>
		</select>
		开始时间:
		<input type="text" name="startTime" id="startTime">
		结束时间:
		<input type="text" name="endTime" id="endTime">
		<input type="submit" value="查询">
		</form>
	</div>
	<div class="listTitle">
		<ul>
			<li style="width:40px;">ID</li>
			<li style="width:100px;">用户名</li>
			<li style="width:300px;">操作Url</li>		
			<li style="width:500px;">操作参数</li>
			<li style="width:150px;">操作时间</li>
		</ul>
		<div class="clear"></div>
	</div>
	<div class="list">
		<c:forEach items="${pageBean.result}" var="log" varStatus="status">
			<div class="${status.index%2==0?'noselect':'select' }">
				<ul>
					<li style="width:40px;">${log.logId}</li>
					<li style="width:100px;">${log.userName }</li>	
					<li style="width:300px;">${log.callUrl }</li>	
					<li style="width:500px;">${log.paramters}&nbsp;</li>
					<li style="width:150px;">${log.callTime }</li>
				</ul>
				<div class="clear"></div>
			</div>
		</c:forEach>
	</div>
	<jsp:include page="../page.jsp" flush="true"></jsp:include>
</div>
</body>
</html>